package com.mostromas.ess.product.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.mostromas.ess.entities.Fabric;
import com.mostromas.ess.entities.FabricComposition;
import com.mostromas.ess.product.req.FabricREQ;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface FabricMapper extends BaseMapper<Fabric> {

    boolean saveFabricComposition(@Param("fabricId") String fabricId, @Param("compositionList") List<FabricComposition> compositionList);

    IPage<Fabric> findFabricDetails(IPage<Fabric> page, @Param("fabric") FabricREQ fabric);

    Fabric findDetailsById(@Param("fabricId")String fabricId);

    List<Fabric> findDetailsByProductId(@Param("productId") String productId);
}
